﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ECGWeb.Controls
{
    public partial class PatientShortDataTable : System.Web.UI.UserControl
    {
        public ECGService.Patient[] patientArray = null;

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            rs_gridview.PageIndexChanging += rs_gridview_PageIndexChanging;
        }

        protected void rs_gridview_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            rs_gridview.PageIndex = e.NewPageIndex;
            rs_gridview.DataBind();
            patientTblUpdatePanel.Update();
        }

        public void setDataSource(ECGService.Patient[] patients)
        {
            this.patientArray = patients;
            rs_gridview.DataSource = patients;
            rs_gridview.DataBind();
        }
    }
}